home *** CD-ROM | disk | FTP | other *** search
- Path: news.cityu.edu.hk!00842506
- From: 00842506@cpccux0.cityu.edu.hk (Maxeller)
- Newsgroups: comp.lang.c
- Subject: Help ! Please help me solve the problem
- Date: 21 Mar 1996 05:44:02 GMT
- Organization: City University of Hong Kong
- Message-ID: <4iqqb2$bkf@ctylnk.cityu.edu.hk>
- NNTP-Posting-Host: ccspc21.cityu.edu.hk
- X-Newsreader: TIN [version 1.2 PL2]
-
- I want to write a disk cache program and so must place my new interrupt
- point into interrupt vector 13 which points to my new function.
-
- Please take a look at my simple test program please:
-
- unsign long old_int_pointer;
-
- new_int_function()
- {
-
-
- /* just jump to old_int_pointer which read from disk
- because it is a test program so nothing others is done */
-
- }
-
- main()
- {
- /* save old int13 pointer into old_int_pointer
- using int21h ax=3513 */
-
- /* put address of new_int_function() into vector 13 area
- using int21h ax=2513 */
-
- /* TSR function goes here */
-
- }
-
- Save and put new interrupt address and TSR is OK.
-
- However when disk reading is involved, it hangs.
-
- My problem is :
- 1) what code should write so it can jump to my
- old_int_pointer. I have though for a long time!! :-(
- 2) I am afraid that when control is passed to new_int_function,
- it can not retrieve values such as old_int_pointer because
- the segment register may not match as that in my program.
-
- Please send me a mail if you have any idea.
- Thanks a lot !! :-)
-
- N.Cheung
- 00842506@cpccux0.cityu.edu.hk
-
-
-